﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace hozoroghiab
{
    public partial class absentofhour : Form
    {
        sql sqlquery;
        public absentofhour(sql s)
        {
            InitializeComponent();
            sqlquery = s;
        }

        private void save_btn_Click(object sender, EventArgs e)
        {
            //string q;
            //try
            //{
            //    sqlquery.open();
            //    int empid = -1;
            //    empid = (int)sqlquery.ExecuteScalar("SELECT employeid FROM profile where profile.name ='" + textBox10.Text.Trim() + "' and profile.family='" + textBox13.Text.Trim() + "'");

            //    q = "INSERT INTO vacation (employeid,day,month,year,beginhour,beginmin,endhour,endmin,totalday)VALUES(" + empid.ToString().Trim() + "," + persianDateTimePicker2.Value.Day.ToString() + "," + persianDateTimePicker2.Value.Month.ToString() + "," + persianDateTimePicker2.Value.Year.ToString() + "," + beginhournumeric.Value + "," + beginminnumeric.Value + "," + endhournumeric.Value + "," + endminnumeric.Value + ",0" + ")";
            //    sqlquery.ExecuteNonQuery(q);
            //    sqlquery.close();
            //}
            //catch
            //{
            //    MessageBox.Show("لطفا اطلاعات را درست وارد کنید");
            //}
            //textBox10.Text = "";
            //textBox13.Text = "";

        }
    }
}
